﻿using MovingChame.WindowsStoreApp.Models;
using MovingChameLibrary.Models;
using MovingChameLibrary.Models.MenuPage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace MovingChame.WindowsStoreApp.CustomControl
{
    public class MainPageDataSelector : DataTemplateSelector
    {
        public DataTemplate s6x6ItemTemplate { get; set; }
        public DataTemplate s2x3ItemTemplate { get; set; }
        public DataTemplate s3x3ItemTemplate { get; set; }

        protected override DataTemplate SelectTemplateCore(object item, DependencyObject container)
        {
            if (item is CurrentTour)
                return s6x6ItemTemplate;
            if ((item is CurrentTourMapItem)|| (item is DefaultMenuItem))
                return s2x3ItemTemplate;
            return s3x3ItemTemplate;
        }
    }
}